package team.first.movieapiv2.doc;

import dev.morphia.annotations.Entity;
import dev.morphia.annotations.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.bson.types.ObjectId;

import java.time.LocalDate;
import java.util.List;

/**
 * @Author: HAPPY
 * @Project_name: project
 * @Package_name: team.first.mongodb.doc
 * @Date: 2021/11/18 23:13
 * @Description：
 */
@Entity(value = "movie", useDiscriminator = false)
@ToString
@Accessors(chain = true)
@Getter
@Setter
@ApiModel(value = "电影文档")
public class MovieDoc {
    @Id
    @ApiModelProperty(value = "对象编号", example = "619f48fae2f3f25894660f72")
    private ObjectId objId;

    @ApiModelProperty(value = "电影编号", example = "1291543")
    private Integer id;

    @ApiModelProperty(value = "电影原名", example = " The Love Note")
    private String originalTitle;

    @ApiModelProperty(value = "电影中文名", example = "恋恋笔记本")
    private String chineseTitle;

    @ApiModelProperty(value = "电影别名", example = "恋爱笔记本")
    private String aka;

    @ApiModelProperty(value = "电影上映年份", example = "2019")
    private Integer year;

    @ApiModelProperty(value = "上映时间", example = "09023")
    private LocalDate pubDate;

    @ApiModelProperty(value = "电影片长", example = "120")
    private Integer duration;

    @ApiModelProperty(value = "语言", example = "English")
    private String language;

    @ApiModelProperty(value = "地区", example = "UK")
    private String region;

    @ApiModelProperty(value = "电影简介", example = "穷小子和富家女之间的爱情故事")
    private String summary;

    @ApiModelProperty(value = "分值", example = "8.9")
    private Double rating;

    @ApiModelProperty(value = "海报地址", example = "www.haibao.com")
    private String posterUrl;

    @ApiModelProperty(value = "电影海报名", example = "The Love Note")
    private String poster;

    @ApiModelProperty(value = "演员列表", example = "大卫.贝克汉姆")
    private List<InnerStaffDoc> directors;

    @ApiModelProperty(value = "导演列表", example = "莱昂纳多")
    private List<InnerStaffDoc> actors;

    @ApiModelProperty(value = "影片类型列表", example = "爱情片")
    private List<GenreDoc> genres;

}
